import React from "react";

class App extends React.Component{
  constructor (){
    super()
    console.log('App');
    // this.f1=this.f1.bind(this)
  }
  state={
    count:6,
  }
  f1=()=>{
    this.state.count--
    console.log('f1:',this);
  }
  render(){
    // 
    
    return(
      <div>
        {/* <button onClick={this.f1.bind(this)}>-</button> */}
        {/* <button onClick={()=>{this.f1()}}>-</button> */}
        <button onClick={this.f1}>-</button>
        <span>{this.state.count}</span>
        <button>+</button>
      </div>
    )
  }
 
}
export default App